/*
 * This file is part of Formin Media Library
 * 
 */
package formin.mediaLibrary.gui.components;

import java.awt.Dimension;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.ListSelectionModel;


/**
 * 
 * 
 * @author formin
 *
 */
public class TVPanel extends JPanel {
	//==========================================================================
    // Static attributes
    //==========================================================================
	private String[] data = {"1", "2","12", "22", "32","32", "42", "2","12", "22", "32","32", "42"};
	//==========================================================================
    // Attributes
    //==========================================================================
	private JPanel showsPanel;
	private JLabel showsArrowPicture;
	private JLabel seasonsArrowPicture;
	private JLabel episodesArrowPicture;
	
	private ImageIcon offArrowIcon;
	private ImageIcon onArrowIcon;
	
	private JLabel genreLabel;
	
	
	private JPanel seasonsPanel;
	
	private JLabel seasonYear;
	private JPanel episodesPanel;
	
	private JScrollPane showsScrollPane;
	private JList showsList;
	
	private JScrollPane seasonsScrollPane;
	private JList seasonsList;
	private JScrollPane episodesScrollPane;
	private JList episodesList;
	
    //==========================================================================
    // Constructors
    //==========================================================================
	public TVPanel(){
		offArrowIcon = new ImageIcon("offArrow.gif");
		onArrowIcon = new ImageIcon("onArrow.gif");

		showsPanel = new JPanel();
		showsArrowPicture = new JLabel(offArrowIcon);
		
		seasonsPanel = new JPanel();
		genreLabel = new JLabel("Genre: something");
		seasonsArrowPicture = new JLabel(offArrowIcon);
		
		episodesPanel = new JPanel();
		episodesArrowPicture = new JLabel(onArrowIcon);
		
		showsPanel.setLayout(new BoxLayout(showsPanel, BoxLayout.Y_AXIS));
		seasonsPanel.setLayout(new BoxLayout(seasonsPanel, BoxLayout.Y_AXIS));
		episodesPanel.setLayout(new BoxLayout(episodesPanel, BoxLayout.Y_AXIS));
		
		showsList = new JList(data);
		showsList.setLayoutOrientation(JList.VERTICAL);
		showsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		
		showsScrollPane = new JScrollPane(showsList);
		showsScrollPane.setPreferredSize(new Dimension(200,500));
		
		seasonsList = new JList(data);
		seasonsList.setLayoutOrientation(JList.VERTICAL);
		seasonsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		
		seasonsScrollPane = new JScrollPane(seasonsList);
		seasonsScrollPane.setPreferredSize(new Dimension(150,450));
		
		
		seasonYear = new JLabel("Year: 2010");
		
		episodesList = new JList(data);
		episodesList.setLayoutOrientation(JList.VERTICAL);
		episodesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		
		episodesScrollPane = new JScrollPane(episodesList);
		episodesScrollPane.setPreferredSize(new Dimension(250,400));
		
		
		showsPanel.add(showsScrollPane);
		showsPanel.add(showsArrowPicture);
		
		seasonsPanel.add(genreLabel);
		seasonsPanel.add(seasonsScrollPane);
		seasonsPanel.add(seasonsArrowPicture);
		
		episodesPanel.add(seasonYear);
		episodesPanel.add(episodesScrollPane);
		episodesPanel.add(episodesArrowPicture);
		
		add(showsPanel);
		add(seasonsPanel);
		add(episodesPanel);
	}
    //==========================================================================
    // Getters
    //==========================================================================

    //==========================================================================
    // Setters
    //==========================================================================

    //==========================================================================
    // Inherited methods
    //==========================================================================

    //==========================================================================
    // Static methods
    //==========================================================================

}
